<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/modules/checkA.php");
include_once("../../../../config.php");
include_once("../controller/important_student_edit.php");
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include ROOT_PATH_.'/controller/common/modules/head.php'; ?>
    <link href="../asset/css/member.css?versinon=202312132"      rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_ . '/application/right_plane/index.php'; ?>
    <link href="/application/right_plane/style.css" rel="stylesheet" type="text/css"/>
    <script src="/application/right_plane/js.js"></script>

</head>


<body>

<div id="topbar">     <?php include ROOT_PATH_.'/controller/common/modules/topbar.php'; ?> </div>


<div id="container" class="<? echo $system_part ?> import_student">


    <div id="sidebar">
        <?php include ROOT_PATH_.'/controller/common/modules/sidebar.php'; ?>
    </div>


    <div id="content" class="layui-form">
        <?php $page_title='导入学生信息';?>
        <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>



        <div class="detail-box">


            <div class="lay-step" style="width: 750px;overflow: hidden;">
            <div class="step-item" style="width: 33.3333%;">
                    <div class="step-item-tail"><i class="step-item-tail-done"></i></div>
                    <div class="step-item-head "><i class="layui-icon layui-icon-ok"></i></div>
                    <!--                完成的话，就用icon-ok样式-->
                    <!--                <div class="step-item-head  step-item-head-active"><i class="layui-icon layui-icon-ok"></i></div>-->
                    <div class="step-item-main">
                        <div class="step-item-main-title">上传文件</div>
                    </div>
                </div>
                <div class="step-item" style="width: 33.3333%;">
                    <div class="step-item-tail"><i class="step-item-tail-done"></i></div>
                    <div class="step-item-head step-item-head-active"><i class="layui-icon">2</i></div>
                    <div class="step-item-main">
                        <div class="step-item-main-title">确认数据</div>
                    </div>
                </div>
                <div class="step-item" style="width: 33.3333%;">
                    <div class="step-item-head"><i class="layui-icon">3</i></div>
                    <div class="step-item-main">
                        <div class="step-item-main-title">完成</div>
                    </div>
                </div>
            </div>


<form action="import_student_process.php?<?= $data['url_parameter'] ?>" method="post" enctype="multipart/form-data">


            <?php $section_title='数据确认';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-section-title.php'; ?>



            <table class="layui-table layui-form" >
                <colgroup>
                    <col  >
                    <col  >
                    <col width="90" >
                    <col width="180" >
                    <col width="180" >
                    <col width="180" >
                </colgroup>
                <thead>
                <tr>
                    <th><div class="els2">学校</div></th>
                    <th><div class="els2">年级</div></th>
                    <th><div class="els2">班别</div></th>
                    <th><div class="els2">姓名</div></th>
                    <th><div class="els2">电话</div></th>
                    <th><div class="els2">状态</div></th>

                </tr>
                </thead>
                <tbody>


                <?php for ($i = 2; $i < count($result); $i++) {?>

                    <tr id="item<? echo $result[$i]['0'] ?>">
                        <td><div class="els2"><? echo $result[$i]['0'] ?></div></td>
                        <td><div class="els2"><? echo $result[$i]['1'] ?></div></td>
                        <td><div class="els2"><? echo $result[$i]['2'] ?></div></td>
                        <td><div class="els2"><? echo $result[$i]['4'] ?></div></td>
                        <td><div class="els2"><? echo $result[$i]['3'] ?></div></td>
                        <td><div class="els2"><? if(!in_array($result[$i]['0'].$result[$i]['1'].$result[$i]['2'] ,$class_list))
                                { $_error=1;?> <span class="layui-bg-red">信息出错</span><?}else{echo '正常';}?></div>
                        </td>
                    </tr>


                    <input type="hidden" name="ai_school[]" value="<?echo $result[$i]['0']?>"/>
                    <input type="hidden" name="ai_grade[]" value="<?echo $result[$i]['1']?>"/>
                    <input type="hidden" name="ai_class_[]" value="<?echo $result[$i]['2']?>"/>
                    <input type="hidden" name="ai_name[]" value="<?echo $result[$i]['4']?>"/>
                    <input type="hidden" name="ai_phone[]" value="<?echo $result[$i]['3']?>"/>


                    <?php;} ?>

                </tbody>
            </table>


            <div class="function">
                <?if($_error){?>
                    <span class="layui-btn layui-btn-disabled"  lay-submit type="submit"  >立即提交</span>
                    <?;}else{?>
                    <button class="layui-btn"  lay-submit type="submit"  >立即提交</button>
                <?;}?>



                <a href="import_student_uploadfile.php?<?= $data['url_parameter'] ?>" class="layui-btn" >
                    重新上传
                </a>
            </div>
</form>













        </div>



        <!--content端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>


</html>
